-- cmd_relogin
-- Create by weism
-- 请求登录指令

function Operation.cmd_relogin()
    if not ME.user then
        return;
    end

    local token = ME.user.dbase:query("token");
    local rid   = ME.user.dbase:query("rid");
    if not token or not rid then
        return;
    end

    -- 发送auth指令
    Operation.cmd_internal_auth(CFG_TYPE_CONSOLE, _G.account, CFG_SERVICE_GS);

    -- 发送登录指令
    trace("cmd_relogin", "发送重新登录消息");
    Communicate.send("CMD_RELOGIN", {
        rid = rid,
        token = token,
    });
    
    return true;
end
